package com.jy.appmarket.network.engine;

import java.util.Map;

import android.content.Context;

import com.jy.appmarket.network.engine.cachestrategy.CacheStrategy;
import com.jy.appmarket.network.engine.cachestrategy.NamedCacheStrategy;
import com.jy.appmarket.network.resultdata.EssentialResultData;

/***
 * @author baker
 * @version 2.0
 * */

public class EssentialNetEngine extends BaseNetEngine {
	/*** 3 day */
	private static final String TIMESTAMP = "timestamp";
	public static final String PHONE_ESSENTIAL = "phone_essential_v2";

	private long mDataVersion = 0;
	private Context mContext;

	public EssentialNetEngine(Context context) {
		mHttpMethod = HTTP_GET;
		mContext = context;
		mResultData = new EssentialResultData(mContext);
		CacheStrategy cs = new NamedCacheStrategy("essential");
		setCacheStrategy(cs);
	}

	@Override
	protected void getParams(Context context, Map<String, String> custParams) {
		custParams.put(TIMESTAMP, String.valueOf(mDataVersion));
	}

	@Override
	protected String getCommand() {
		return "essential";
	}

}
